import com.dmotiko.bolacua.*
import com.dmotiko.general.*

class NewsLoader
extends DataXMLLoader {

	private function parserFunction(){
		var news:Array = xml.firstChild.childNodes;
			var newsData:Array = new Array();
			var oNew:Object;
			for (var i:Number = 0; i < news.length; i++) {
				oNew = new Object();
				oNew.link = news[i].attributes.link;
				oNew.title = news[i].attributes.title;				
				//BolacuaSite.getApp().log("NewsLoader= " + news[i].attributes.width+" | "+news[i].attributes.height);
				
				oNew.width = news[i].attributes.width;
				if(!oNew.width) oNew.width = "600"; 
				oNew.height = news[i].attributes.height;
				if(!oNew.height) oNew.height = "900";
				oNew.content = news[i].firstChild.firstChild;
				newsData.push(oNew);
			}
		this.data = newsData;
		loadEnd();
	}
	
}